package com.uton.rfidcontroller.view.activity;

import android.content.Intent;
import android.widget.Button;

import com.uton.rfidcontroller.R;
import com.uton.rfidcontroller.databinding.ActivityStartBinding;
import com.uton.rfidcontroller.view.base.BaseActivity;
import com.uton.rfidcontroller.viewmodel.activity_model.StartActivityViewModel;

import butterknife.BindView;
import butterknife.OnClick;
import io.reactivex.ObservableTransformer;


public class StartActivity extends BaseActivity<ActivityStartBinding, StartActivityViewModel> {
    @BindView(R.id.btn_next1)
    Button goSetting;
    @BindView(R.id.btn_next2)
    Button goMainList;


    @OnClick({R.id.btn_next1, R.id.btn_next2})
    public void eventDispatcher(Button button) {
        switch (button.getId()) {
            case R.id.btn_next1:
                Intent intent1 = new Intent(this, SettingActivity.class);
                startActivity(intent1);
                break;
            case R.id.btn_next2:
                Intent intent2 = new Intent(this, MainActivity.class);
                startActivity(intent2);
                break;
            default:
                break;
        }
    }


    @Override
    protected int setLayout() {
        return R.layout.activity_start;
    }

    @Override
    protected void inject() {
        getBinding().setStartActivityModel(getViewModel());
    }

    @Override
    protected String setTitle() {
        return null;
    }

    @Override
    protected void doSomething() {

    }

    @Override
    protected StartActivityViewModel setViewModel() {
        return new StartActivityViewModel() {
            @Override
            public ObservableTransformer setObservable() {
                return compose(bindToLifecycle());
            }
        };
    }


}
